App.controller('bookingPlanController', ['$rootScope', '$scope', '$state', '$window', 'Page',function($rootScope, $scope, $state, $window, Page) {
	
	$scope.booking.step = 1;
	
	$scope.selectBookingPlan = function(plan) {
		if($scope.booking.plan && $scope.booking.plan.planId == plan.planId){
			
		}else{
			$scope.booking.plan = plan;
			$scope.booking.rideDates = [];
		}
	};
	 	
	
	$scope.bookingNextStep = function() {
		if(!$scope.booking.plan){
			Page.alert("请选择乘车时间!");
			return false;
		}
		$state.go('booking.date');
	};
	
}]);